package tech.lixinlei.collection.list.add;

import java.util.ArrayList;
import java.util.List;

public class AddDemo {

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);

        for (Integer i : list) {
            System.out.println(i);
        }
        System.out.println();

        list.add(1,999);
        for (Integer i : list) {
            System.out.println(i);
        }
    }

}
